<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/12/13
 * Time: 10:23
 */
namespace app\portal\model;

use think\Model;

class PortalCategoryPostModel extends Model{
    public function category(){
        return $this->hasOne('PortalCategoryModel','id','category_id');
    }
    public function post(){
        return $this->hasOne('PortalPostModel','id','post_id')->field('id,post_title,published_time');
    }
}
